Optimal. Leaf size=367 \[ -\frac{b n \text{PolyLog}\left (2,-d f x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{4 d^2 f^2}+\frac{b^2 n^2 \text{PolyLog}\left (2,-d f x^2\right )}{16 d^2 f^2}+\frac{b^2 n^2 \text{PolyLog}\left (3,-d f x^2\right )}{8 d^2 f^2}-\frac{\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{4 d^2 f^2}+\frac{b n \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{8 d^2 f^2}+\frac{1}{4} x^4 \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac{1}{8} b n x^4 \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )+\frac{x^2 \left (a+b \log \left (c x^n\right )\right )^2}{4 d f}-\frac{3 b n x^2 \left (a+b \log \left (c x^n\right )\right )}{8 d f}-\frac{1}{8} x^4 \left (a+b \log \left (c x^n\right )\right )^2+\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right )-\frac{b^2 n^2 \log \left (d f x^2+1\right )}{32 d^2 f^2}+\frac{7 b^2 n^2 x^2}{32 d f}+\frac{1}{32} b^2 n^2 x^4 \log \left (d f x^2+1\right )-\frac{3}{64} b^2 n^2 x^4 \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.364539, antiderivative size = 367, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 9, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.321, Rules used = {2454, 2395, 43, 2377, 2304, 2374, 6589, 2376, 2391} \[ -\frac{b n \text{PolyLog}\left (2,-d f x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{4 d^2 f^2}+\frac{b^2 n^2 \text{PolyLog}\left (2,-d f x^2\right )}{16 d^2 f^2}+\frac{b^2 n^2 \text{PolyLog}\left (3,-d f x^2\right )}{8 d^2 f^2}-\frac{\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{4 d^2 f^2}+\frac{b n \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{8 d^2 f^2}+\frac{1}{4} x^4 \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac{1}{8} b n x^4 \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )+\frac{x^2 \left (a+b \log \left (c x^n\right )\right )^2}{4 d f}-\frac{3 b n x^2 \left (a+b \log \left (c x^n\right )\right )}{8 d f}-\frac{1}{8} x^4 \left (a+b \log \left (c x^n\right )\right )^2+\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right )-\frac{b^2 n^2 \log \left (d f x^2+1\right )}{32 d^2 f^2}+\frac{7 b^2 n^2 x^2}{32 d f}+\frac{1}{32} b^2 n^2 x^4 \log \left (d f x^2+1\right )-\frac{3}{64} b^2 n^2 x^4 \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2454
Rule 2395
Rule 43
Rule 2377
Rule 2304
Rule 2374
Rule 6589
Rule 2376
Rule 2391
Rubi steps
\begin{align*} \int x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac{1}{d}+f x^2\right )\right ) \, dx &=\frac{x^2 \left (a+b \log \left (c x^n\right )\right )^2}{4 d f}-\frac{1}{8} x^4 \left (a+b \log \left (c x^n\right )\right )^2-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{4 d^2 f^2}+\frac{1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-(2 b n) \int \left (\frac{x \left (a+b \log \left (c x^n\right )\right )}{4 d f}-\frac{1}{8} x^3 \left (a+b \log \left (c x^n\right )\right )-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{4 d^2 f^2 x}+\frac{1}{4} x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )\right ) \, dx\\ &=\frac{x^2 \left (a+b \log \left (c x^n\right )\right )^2}{4 d f}-\frac{1}{8} x^4 \left (a+b \log \left (c x^n\right )\right )^2-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{4 d^2 f^2}+\frac{1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\frac{1}{4} (b n) \int x^3 \left (a+b \log \left (c x^n\right )\right ) \, dx-\frac{1}{2} (b n) \int x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right ) \, dx+\frac{(b n) \int \frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{x} \, dx}{2 d^2 f^2}-\frac{(b n) \int x \left (a+b \log \left (c x^n\right )\right ) \, dx}{2 d f}\\ &=\frac{b^2 n^2 x^2}{8 d f}-\frac{1}{64} b^2 n^2 x^4-\frac{3 b n x^2 \left (a+b \log \left (c x^n\right )\right )}{8 d f}+\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right )+\frac{x^2 \left (a+b \log \left (c x^n\right )\right )^2}{4 d f}-\frac{1}{8} x^4 \left (a+b \log \left (c x^n\right )\right )^2+\frac{b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{8 d^2 f^2}-\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{4 d^2 f^2}+\frac{1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-\frac{b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-d f x^2\right )}{4 d^2 f^2}+\frac{1}{2} \left (b^2 n^2\right ) \int \left (\frac{x}{4 d f}-\frac{x^3}{8}-\frac{\log \left (1+d f x^2\right )}{4 d^2 f^2 x}+\frac{1}{4} x^3 \log \left (1+d f x^2\right )\right ) \, dx+\frac{\left (b^2 n^2\right ) \int \frac{\text{Li}_2\left (-d f x^2\right )}{x} \, dx}{4 d^2 f^2}\\ &=\frac{3 b^2 n^2 x^2}{16 d f}-\frac{1}{32} b^2 n^2 x^4-\frac{3 b n x^2 \left (a+b \log \left (c x^n\right )\right )}{8 d f}+\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right )+\frac{x^2 \left (a+b \log \left (c x^n\right )\right )^2}{4 d f}-\frac{1}{8} x^4 \left (a+b \log \left (c x^n\right )\right )^2+\frac{b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{8 d^2 f^2}-\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{4 d^2 f^2}+\frac{1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-\frac{b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-d f x^2\right )}{4 d^2 f^2}+\frac{b^2 n^2 \text{Li}_3\left (-d f x^2\right )}{8 d^2 f^2}+\frac{1}{8} \left (b^2 n^2\right ) \int x^3 \log \left (1+d f x^2\right ) \, dx-\frac{\left (b^2 n^2\right ) \int \frac{\log \left (1+d f x^2\right )}{x} \, dx}{8 d^2 f^2}\\ &=\frac{3 b^2 n^2 x^2}{16 d f}-\frac{1}{32} b^2 n^2 x^4-\frac{3 b n x^2 \left (a+b \log \left (c x^n\right )\right )}{8 d f}+\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right )+\frac{x^2 \left (a+b \log \left (c x^n\right )\right )^2}{4 d f}-\frac{1}{8} x^4 \left (a+b \log \left (c x^n\right )\right )^2+\frac{b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{8 d^2 f^2}-\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{4 d^2 f^2}+\frac{1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\frac{b^2 n^2 \text{Li}_2\left (-d f x^2\right )}{16 d^2 f^2}-\frac{b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-d f x^2\right )}{4 d^2 f^2}+\frac{b^2 n^2 \text{Li}_3\left (-d f x^2\right )}{8 d^2 f^2}+\frac{1}{16} \left (b^2 n^2\right ) \operatorname{Subst}\left (\int x \log (1+d f x) \, dx,x,x^2\right )\\ &=\frac{3 b^2 n^2 x^2}{16 d f}-\frac{1}{32} b^2 n^2 x^4-\frac{3 b n x^2 \left (a+b \log \left (c x^n\right )\right )}{8 d f}+\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right )+\frac{x^2 \left (a+b \log \left (c x^n\right )\right )^2}{4 d f}-\frac{1}{8} x^4 \left (a+b \log \left (c x^n\right )\right )^2+\frac{1}{32} b^2 n^2 x^4 \log \left (1+d f x^2\right )+\frac{b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{8 d^2 f^2}-\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{4 d^2 f^2}+\frac{1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\frac{b^2 n^2 \text{Li}_2\left (-d f x^2\right )}{16 d^2 f^2}-\frac{b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-d f x^2\right )}{4 d^2 f^2}+\frac{b^2 n^2 \text{Li}_3\left (-d f x^2\right )}{8 d^2 f^2}-\frac{1}{32} \left (b^2 d f n^2\right ) \operatorname{Subst}\left (\int \frac{x^2}{1+d f x} \, dx,x,x^2\right )\\ &=\frac{3 b^2 n^2 x^2}{16 d f}-\frac{1}{32} b^2 n^2 x^4-\frac{3 b n x^2 \left (a+b \log \left (c x^n\right )\right )}{8 d f}+\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right )+\frac{x^2 \left (a+b \log \left (c x^n\right )\right )^2}{4 d f}-\frac{1}{8} x^4 \left (a+b \log \left (c x^n\right )\right )^2+\frac{1}{32} b^2 n^2 x^4 \log \left (1+d f x^2\right )+\frac{b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{8 d^2 f^2}-\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{4 d^2 f^2}+\frac{1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\frac{b^2 n^2 \text{Li}_2\left (-d f x^2\right )}{16 d^2 f^2}-\frac{b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-d f x^2\right )}{4 d^2 f^2}+\frac{b^2 n^2 \text{Li}_3\left (-d f x^2\right )}{8 d^2 f^2}-\frac{1}{32} \left (b^2 d f n^2\right ) \operatorname{Subst}\left (\int \left (-\frac{1}{d^2 f^2}+\frac{x}{d f}+\frac{1}{d^2 f^2 (1+d f x)}\right ) \, dx,x,x^2\right )\\ &=\frac{7 b^2 n^2 x^2}{32 d f}-\frac{3}{64} b^2 n^2 x^4-\frac{3 b n x^2 \left (a+b \log \left (c x^n\right )\right )}{8 d f}+\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right )+\frac{x^2 \left (a+b \log \left (c x^n\right )\right )^2}{4 d f}-\frac{1}{8} x^4 \left (a+b \log \left (c x^n\right )\right )^2-\frac{b^2 n^2 \log \left (1+d f x^2\right )}{32 d^2 f^2}+\frac{1}{32} b^2 n^2 x^4 \log \left (1+d f x^2\right )+\frac{b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{8 d^2 f^2}-\frac{1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{4 d^2 f^2}+\frac{1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\frac{b^2 n^2 \text{Li}_2\left (-d f x^2\right )}{16 d^2 f^2}-\frac{b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-d f x^2\right )}{4 d^2 f^2}+\frac{b^2 n^2 \text{Li}_3\left (-d f x^2\right )}{8 d^2 f^2}\\ \end{align*}
Mathematica [C] time = 0.337078, size = 654, normalized size = 1.78 \[ \frac{b n \left (8 \text{PolyLog}\left (2,-i \sqrt{d} \sqrt{f} x\right )+8 \text{PolyLog}\left (2,i \sqrt{d} \sqrt{f} x\right )-d^2 f^2 x^4+4 d^2 f^2 x^4 \log (x)+4 d f x^2-8 d f x^2 \log (x)+8 \log (x) \log \left (1-i \sqrt{d} \sqrt{f} x\right )+8 \log (x) \log \left (1+i \sqrt{d} \sqrt{f} x\right )\right ) \left (-4 a-4 b \log \left (c x^n\right )+4 b n \log (x)+b n\right )+32 b^2 n^2 \left (\text{PolyLog}\left (3,-i \sqrt{d} \sqrt{f} x\right )+\text{PolyLog}\left (3,i \sqrt{d} \sqrt{f} x\right )-\log (x) \text{PolyLog}\left (2,-i \sqrt{d} \sqrt{f} x\right )-\log (x) \text{PolyLog}\left (2,i \sqrt{d} \sqrt{f} x\right )-\frac{1}{32} d^2 f^2 x^4 \left (8 \log ^2(x)-4 \log (x)+1\right )+\frac{1}{4} d f x^2 \left (2 \log ^2(x)-2 \log (x)+1\right )-\frac{1}{2} \log ^2(x) \log \left (1-i \sqrt{d} \sqrt{f} x\right )-\frac{1}{2} \log ^2(x) \log \left (1+i \sqrt{d} \sqrt{f} x\right )\right )+2 d^2 f^2 x^4 \log \left (d f x^2+1\right ) \left (8 a^2-4 b (b n-4 a) \log \left (c x^n\right )-4 a b n+8 b^2 \log ^2\left (c x^n\right )+b^2 n^2\right )-d^2 f^2 x^4 \left (8 a^2+16 a b \left (\log \left (c x^n\right )-n \log (x)\right )-4 a b n+8 b^2 \left (\log \left (c x^n\right )-n \log (x)\right )^2+4 b^2 n \left (n \log (x)-\log \left (c x^n\right )\right )+b^2 n^2\right )+2 d f x^2 \left (8 a^2+16 a b \left (\log \left (c x^n\right )-n \log (x)\right )-4 a b n+8 b^2 \left (\log \left (c x^n\right )-n \log (x)\right )^2+4 b^2 n \left (n \log (x)-\log \left (c x^n\right )\right )+b^2 n^2\right )-2 \log \left (d f x^2+1\right ) \left (8 a^2+16 a b \left (\log \left (c x^n\right )-n \log (x)\right )-4 a b n+8 b^2 \left (\log \left (c x^n\right )-n \log (x)\right )^2+4 b^2 n \left (n \log (x)-\log \left (c x^n\right )\right )+b^2 n^2\right )}{64 d^2 f^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.109, size = 0, normalized size = 0. \begin{align*} \int{x}^{3} \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) ^{2}\ln \left ( d \left ({d}^{-1}+f{x}^{2} \right ) \right ) \, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{1}{32} \,{\left (8 \, b^{2} x^{4} \log \left (x^{n}\right )^{2} - 4 \,{\left (b^{2}{\left (n - 4 \, \log \left (c\right )\right )} - 4 \, a b\right )} x^{4} \log \left (x^{n}\right ) +{\left ({\left (n^{2} - 4 \, n \log \left (c\right ) + 8 \, \log \left (c\right )^{2}\right )} b^{2} - 4 \, a b{\left (n - 4 \, \log \left (c\right )\right )} + 8 \, a^{2}\right )} x^{4}\right )} \log \left (d f x^{2} + 1\right ) - \int \frac{8 \, b^{2} d f x^{5} \log \left (x^{n}\right )^{2} + 4 \,{\left (4 \, a b d f -{\left (d f n - 4 \, d f \log \left (c\right )\right )} b^{2}\right )} x^{5} \log \left (x^{n}\right ) +{\left (8 \, a^{2} d f - 4 \,{\left (d f n - 4 \, d f \log \left (c\right )\right )} a b +{\left (d f n^{2} - 4 \, d f n \log \left (c\right ) + 8 \, d f \log \left (c\right )^{2}\right )} b^{2}\right )} x^{5}}{16 \,{\left (d f x^{2} + 1\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (b^{2} x^{3} \log \left (d f x^{2} + 1\right ) \log \left (c x^{n}\right )^{2} + 2 \, a b x^{3} \log \left (d f x^{2} + 1\right ) \log \left (c x^{n}\right ) + a^{2} x^{3} \log \left (d f x^{2} + 1\right ), x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} x^{3} \log \left ({\left (f x^{2} + \frac{1}{d}\right )} d\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]